package org.flexlancer.databases
{
	public class ExpenseType
	{
		private static const TABLE:String = "expensetype";

		public static function Add(expensetypename:String):void{
			try{
				var insertObj:Object = new Object();
				insertObj.expensetypename = expensetypename;
				DatabaseManager.Manager.Insert(TABLE,insertObj);
			}catch(err:Error){
				throw err;
			}
		}

		public static function List(condition:String = ""):Array{
			try{
				return DatabaseManager.Manager.Select(TABLE,null,condition,"expensetypename");
			}catch(err:Error){
				throw err;
			}
			return new Array;
		}
		
		public static function Delete(condition:String = ""):void{
			try{
				DatabaseManager.Manager.Delete(TABLE,condition);
			}catch(err:Error){
				throw err;
			}
		}
	}
}